<%@ page import="java.util.*" %>
<%@ page import="com.scau.beyondboy.model.BookEntity" %>
<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2015/12/13
  Time: 20:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>显示书本信息</title>
</head>
<body>
<form  method="post"  action="/book/findhandler">
  <input type="text" name="find"/>
  <input type="submit" value="查询"/>
</form>
  <table border="1">
    <thead>
      <tr><td>书号</td><td>书名</td><td>作者</td><td>出版商</td><td>价格</td><td>操作</td></tr>
    </thead>
    <%
      List<BookEntity> list=(List<BookEntity>)session.getAttribute("bookList");
      Iterator<BookEntity> iterator=list.iterator();
      while (iterator.hasNext())
      {
        BookEntity bookEntity =iterator.next();

    %>
    <tr>
      <td><%=bookEntity.getBookId()%></td>
      <td><%=bookEntity.getTitle()%></td>
      <td><%=bookEntity.getAuthor()%></td>
      <td><%=bookEntity.getPublisher()%></td>
      <td><%=bookEntity.getPrice()%></td>
      <td><a href="/book/addBook">添加</a><a href="/book/delete?bookId=<%=bookEntity.getBookId()%>">删除</a> </td>
    </tr>
    <%}%>
  </table>
</body>
</html>
